<?php
/**
 * Created by PhpStorm.
 * User: lullabies
 * Date: 2019/5/17
 * Time: 10:26
 */

namespace app\api\validate;


class Register extends BaseValidate
{
    //设置验证规则
    protected $rule=[
        'username|用户名' => 'require',
        'pwd|密码' => 'require|alphaDash',
        'phone|手机号' => 'require|mobile',
    ];
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */
    protected $message = [
        'phone.mobile' =>'手机号格式错误，请重新输入!',
    ];
}